/**
 * main.cpp for tigerrad
 * fall 2006
 */

#include "SDLWindow.h"
#include "Simulation.h"
#include "CornellBoxScene.h"
#include "Engine.h"

/**
 * tigerrad entry point
 */
int main(int argc, char** argv)
{
	try {
		//Vec2s size(480,480);
		Vec2s size(900, 900);
		SDLWindow window(size,24);
		ScenePtr scene(new CornellBoxScene());
		EnginePtr engine(new Engine());
		SimulationPtr sim(new Simulation(scene, engine));
		window.setSimulation(sim);
		window.setEngine(engine);
		window.mainLoop();
	} catch (const std::string& msg) {
		std::cerr << msg << std::endl;
	} catch (...) {
		std::cerr << "Woops, someone threw an unexpected exception..." << std::endl;
	}
}

